Forum : "name" attribute in form tag
Brief description  about Online courses   join in Online courses
View Sri Bhargavi  Peesapati 's Profile

"name" attribute in form tag

Hi, When we create radio buttons or checkboxes for a form, is it compulsory that the name attribute for all the radiobuttons/checkboxes should be the same? Like for example, in our tutorial, there is an example on vehicle radiobutton where the name attribute is vehicle for all radiobuttons..n similarly for checkbox example also..
Asked by Sri Bhargavi Peesapati | Jun 27, 2010 |  Reply now
Replies (4)
View sri-bhargavi peesapati 's Profile
yeah .. thanks !
Jun 29, 2010
View gopinath raghurama damale 's Profile
As I know, check boxes need not have same names. But radio buttons in a group should have the same name. This is because the user has to select only one item from a group of radio buttons and giving the same name will make it possible to identify the radio buttons in a particular group.
Jun 29, 2010
View sri-bhargavi peesapati 's Profile
Thank You ..
Jun 28, 2010
View siddiqui nadeem ahmed 's Profile
yes, it shows the category like for gender and some fields contains yes or no so we use radio buttons for that and for check boxes also applies the same but for check boxes we have an option that how many we are capable or having for example if you have so many courses completed then use check boxes or having bike car and cycle so you can click on that
Jun 27, 2010